/*******************************************************************************
 ** 
 ** (C) 2011 Kevin Druelle 
 **
 ** this software is free software: you can redistribute it and/or modify
 ** it under the terms of the GNU Lesser General Public License as published by
 ** the Free Software Foundation, either version 3 of the License, or
 ** (at your option) any later version.
 ** 
 ** This software is distributed in the hope that it will be useful,
 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ** GNU General Public License for more details.
 ** 
 ** You should have received a copy of the GNU General Public License
 ** along with this software.  If not, see <http://www.gnu.org/licenses/>.
 ** 
 ******************************************************************************/

#ifndef CPPTOOLBOX_STRING_H_
#define	CPPTOOLBOX_STRING_H_


#include <string>
#include <vector>

namespace cpptoolbox{

typedef enum alignment_e{
    align_left,
    align_center,
    align_right
}alignment_t;
    
std::string toUpper(const std::string & str);
std::string toLower(const std::string & str);

std::vector<std::string> split(const std::string & str, char delim);

std::string pad(const std::string & str, size_t width, char pad = ' ', alignment_t align = align_right);

std::string trim(const std::string & str, const std::string & trim = " \n\r\t");
std::string trim_left(const std::string & str, const std::string & trim = " \n\r\t");
std::string trim_right(const std::string & str, const std::string & trim = " \n\r\t");


}


#endif	/* CPPTOOLBOX_STRING_H_ */

